<?php
namespace app\admin\validate;
use think\validate;

class Place extends validate
{
     protected $rule = [
        'designation' => 'require',
        'address' => 'require',
        'business_hours' => 'require',
        'wifi' => 'require|in:0,1',

    ];

    protected $message = [
        'designation' => '{%designation_require}',
        'address' => '{%address_require}',
        'business_hours' => '{%business_hours_val}',
        'wifi' => '{%wifi_val}',
        'status' => '{%status_val}',
    ];

    protected $scene = [
        'add'   => ['designation', 'address', 'business_hours', 'wifi'],
        'edit'  => ['designation', 'address', 'business_hours', 'wifi'],
        'details'  => ['status','city','signature'],
        'password' => ['password', 'repassword'],
        'status' => ['status'],

    ];
}